/*
 * Copyright 2006-2022 ahtelit.com, All Rights Reserved.
 */

package com.telit.communicate.feign;

import com.telit.common.entity.DataReturn;
import com.telit.communicate.dto.MsgProcessPathDTO;
import com.telit.communicate.dto.SendMessageDTO;
import com.telit.communicate.feign.factory.RemoteCommunicateServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 * communicate feign
 *
 * @author yuezhuang
 * @since 2022-12-14
 */
@FeignClient(contextId = "remoteCommunicateService", name = "yichang-communicate", fallbackFactory = RemoteCommunicateServiceFallbackFactory.class)
public interface RemoteCommunicateService {

    @PostMapping(value = "/communicate/msg/send", produces = "application/json;charset=UTF-8")
    DataReturn sendMsg(@RequestBody SendMessageDTO sendMessageDTO);

    @PostMapping(value = "/communicate/msg/subscribeMsgProcess", produces = "application/json;charset=UTF-8")
    DataReturn subscribeMsgProcess(@RequestBody MsgProcessPathDTO msgProcessPathDTO);

    @PostMapping(value = "/communicate/msg/unSubscribeMsgProcess", produces = "application/json;charset=UTF-8")
    DataReturn unSubscribeMsgProcess(@RequestBody MsgProcessPathDTO msgProcessPathDTO);

}
